{% extends "main.html" %}

{% block title %}Reports {{ repo }} {% endblock %}

{% block content_title %}Report Information{% endblock %}

{% block breadcrumbs %}{{ block.super }} &rsaquo; <a href="{% url 'repo_list' %}">Reports</a> &rsaquo; {{ report }} {% endblock %}

{% block content %}
<div class="module">
  <h2>{{report}}</h2>
  <table>
    <tr><td>Host</td><td> {{ report.host }} </td></tr>
    <tr><td>Reporting IP Address</td><td> {{ report.report_ip }} </td></tr>
    <tr><td>Domain</td><td> {{ report.domain }} </td></tr>
    <tr><td>Running Kernel</td><td> {{ report.kernel }} </td></tr>
    <tr><td>Reboot Required?</td><td> {{ report.reboot }} </td></tr>
    <tr><td>OS</td><td> {{ report.os }} </td></tr>
    <tr><td>Arch</td><td> {{ report.arch }} </td></tr>
    <tr><td>Tags</td><td> {{ report.tags }} </td></tr>
    <tr><td>Client Protocol</td><td> {{ report.protocol }} </td></tr>
    <tr><td>User Agent</td><td> {{ report.useragent }} </td></tr>
    <tr><td>Has Been Processed?</td><td> {{ report.processed }} </td></tr>
    </table>
</div>
{% if user.is_authenticated %}
  {% if perms.is_admin %}
  <div class="module">
    <h2>Actions</h2>
      <a class="brick" href="{% url 'report_delete' report.id %}">Delete this report</a>
      <a class="brick" href="{% url 'report_process' report.id %}">Process this report</a>
    <div class="clearbrick"></div>
  </div>
  {% endif %}
{% endif %}
{% if report.sec_updates %}
<div class="module">
  <h2>Security Updates</h2>
  <table>
  {% for update in report.sec_updates.splitlines %}
    <tr class="{% cycle 'row1' 'row2' %}">
      <td> {{ update }} </td>
    </tr>
  {% endfor %}
  </table>
</div>
{% endif %}
{% if report.bug_updates %}
<div class="module">
  <h2>Bugfix Updates</h2>
  <table>
  {% for update in report.bug_updates.splitlines %}
    <tr class="{% cycle 'row1' 'row2' %}">
      <td> {{ update }} </td>
    </tr>
  {% endfor %}
  </table>
</div>
{% endif %}
<div class="module">
  <h2>Repositories</h2>
  <table>
  {% for repo in report.repos.splitlines %}
    <tr class="{% cycle 'row1' 'row2' %}">
      <td> {{ repo }} </td>
    </tr>
  {% endfor %}
  </table>
</div>
<div class="module">
  <h2>Packages</h2>
  <table>
  {% for package in report.packages.splitlines %}
    <tr class="{% cycle 'row1' 'row2' %}">
      <td> {{ package }} </td>
    </tr>
  {% endfor %}
  </table>
</div>
{% endblock %}

